const TokenKey = 'geek-study-pc-token'

/**
 * 设置token
 * @param {*} token 
 * @returns 
 */
export const setToken = (token) => localStorage.setItem(TokenKey,token)

/**
 * 获取token
 * @returns token 字符串
 */
export const getToken = () => localStorage.getItem(TokenKey)

/**
 * 删除token
 * @returns 
 */
export const removeToken = () => localStorage.removeItem(TokenKey)

/**
 * 判断是否有token
 * @returns 布尔值
 */
export const hasToken = () => !!getToken()